package com.huaxia.day13;

public class ThreadTest {
    public static void main(String[] args) {
        testCreate();
        System.out.println(Thread.currentThread().getName());
    }

    /**
     * 多运行几次结果不一样
     * 调整线程优先级后再运行几次看结果是否一致
     */
    public static void testCreate() {
        Thread printThread = new PrintThread();
        printThread.setName("打印线程");
        printThread.start();
        printThread.setPriority(1);

        Thread runable = new Thread(new PrintRunnable());
        runable.setName("打印线程runnable");
        runable.start();
        runable.setPriority(10);
    }
}
